Skip to main content

1D Search Methods

  • In this section, we are interested in the problem of minimizing an objective function f:RRf:\mathbb{R}\to\mathbb{R} (i.e., a one-dimensionla problem). The approach is to use an iterative search algorithm, also called a line-search method.
  • In an iterative algorithm, we start with an initial candidate solution x(0)x^{(0)} and generate a sequence of iterates x(1),x(2),x^{(1)}, x^{(2)}, \cdots. For eah iteration k=0,1,2,,k=0,1,2,\cdots, the next point x(k+1)x^{(k+1)} depends on x(k)x^{(k)} and the objective function ff.
  • The only property that we assume of the objective function ff is that it is unimodal, which means that ff has only one local minimizer.
  • Our goal is to narrow the range prograssively until the minimizer is "boxed in" with sufficient accuracy.

Consider a unimodel function ff of one variable and the interval [a0,b0][a_0,b_0]. Illustrated in Figure 7.2, we choose the intermediate points in such a way that the reduction in the range is symmetric, in the sense that

a1a0=b0b1=ρ(b0,a0),ρ<12.\begin{gather*} a_1-a_0=b_0-b_1=\rho(b_0,a_0), \rho<{1\over 2}. \end{gather*}

We then evaluate ff at the intermediate points. If f(a1)<f(b1)f(a_1)<f(b_1), then the minimizer must lie in the range [a0,b1][a_0, b_1]. If, on the other hand, f(a1)f(b1)f(a_1) \ge f(b_1), then the minimizer is located in the range [a1,b0][a_1, b_0].

Suppose, for example, that f(a1)<f(bq)f(a_1)<f(b_q). Then, we know that x[a0,b1]x^* \in [a_0,b_1]. Because a1a_1 is already in the uncertainty interval and f(a1)f(a_1) is already known, we can make a1a_1 coincide with b2b_2. Thus, only one new evaluation of ff at a2a_2 would be necessary. To find the value of pp that results in only one new evaluation of ff, see Figure 7.4. Without loss of generality, imagine that the original range [a0,b0][a_0, b_0] is of unit length. Then, to have only one new evaluation of ff it is enough to choose ρ\rho so that

ρ(b1a0)=b1b2.\begin{gather*} \rho(b_1-a_0)=b_1-b_2. \end{gather*}

Because b1a0=1ρb_1-a_0=1-\rho and b1b2=12ρb_1-b_2=1-2\rho, we have

ρ(1ρ)=12ρ.\begin{gather*} \rho(1-\rho)=1-2\rho. \end{gather*}

We write the quadratic equation above as

ρ23ρ+1=0.\begin{gather*} \rho^2-3\rho+1=0. \end{gather*}

The solutions are

ρ1=3+52,    ρ2=352.\begin{gather*} \rho_1={3+\sqrt{5} \over 2},\;\;\rho_2={3-\sqrt{5} \over 2}. \end{gather*}

Because we require that ρ<12\rho<{1\over 2}, we take

ρ=3520.382.\begin{gather*} \rho={3-\sqrt{5} \over 2} \approx 0.382. \end{gather*}

Observe that

ρ1ρ=3551=512=1ρ1,\begin{gather*} {\rho \over 1-\rho} = {3-\sqrt{5}\over \sqrt{5}-1}={\sqrt{5}-1\over 2}={1-\rho\over 1}, \end{gather*}

that is,

ρ1ρ=1ρ1.\begin{gather*} {\rho\over 1-\rho}={1-\rho\over 1}. \end{gather*}

Using this method, the uncertainty range is reduced by the ratio 1ρ0.618031-\rho \approx 0.61803 at every stage. Hence, NN steps of reduction using the golden section method reduces the range by the factor

(1ρ)N(0.61803)N.\begin{gather*} (1-\rho)^N\approx (0.61803)^N. \end{gather*}

Fobonacci Method

Instead of using the same ρ\rho, we are allowed to vary the valye ρ\rho from stage to stage, so that at the kkth stage in the reduction process we use a value ρk\rho_k, at the next stage we use a value ρk+1\rho_{k+1}, and so on.

To derive the strategy for selecting evaluation points, consider Figure 7.5. We see that it is sufficient to choose the ρk\rho_k such that

ρk+1(1ρk)=12ρk.\begin{gather*} \rho_{k+1}(1-\rho_k)=1-2\rho_k. \end{gather*}

After some manipulations, we obtain

ρk+1=1ρk1ρk.\begin{gather*} \rho_{k+1}=1-{\rho_k\over 1-\rho_k}. \end{gather*}

Suppose that we are given a sequence ρ1,ρ2,\rho_1, \rho_2,\cdots satisfying the conditions above and we use this sequence in our search algorithm. Then, after NN iterations of the algorithm, the uncertainty range is reduced by a factor of

(1ρ1)(1ρ2)(1ρN)\begin{gather*} (1-\rho_1)(1-\rho_2)\cdots(1-\rho_N) \end{gather*}

We therefore want to

minimize    (1ρ1)(1ρ2)(1ρN)subject to    ρk+1=1ρk1ρk,k=1,,N10ρk12,k=1,,N.\begin{align*} \text{minimize}\;\; & (1-\rho_1)(1-\rho_2)\cdots(1-\rho_N) \\ \text{subject to}\;\; & \rho_{k+1}=1-{\rho_k\over 1-\rho_k},k=1,\cdots,N-1 \\ & 0\le\rho_k\le{1\over 2},k=1,\cdots,N. \end{align*}

Fibonacci Sequence

The sequence is defined as follows. First, let F1=0F_{-1}=0 and F0=1F_0=1 by convention. Then, for k0k \ge 0,

Fk+1=Fk+Fk1.\begin{gather*} F_{k+1}=F_k+F_{k-1}. \end{gather*}

It turns out that the solution to the optimization problem above is

ρ1=1FNFN+1,ρ2=1FN1FN,ρk=1FNk+1FNk+2,ρN=1F1F2,\begin{align*} \rho_1 & = 1-{F_N\over F_{N+1}}, \\ \rho_2 & = 1-{F_{N-1}\over F_{N}}, \\ & \vdots \\ \rho_k & = 1-{F_{N-k+1}\over F_{N-k+2}}, \\ & \vdots \\ \rho_N & = 1-{F_1\over F_2}, \end{align*}

where the FkF_k are the elements of the Fibonacci sequence. The resulting algorithm is called the Fibonacci search method.
The uncertainty range is reduced by the factor

(1ρ1)(1ρ2)(1ρN)=FNFN+1FN1FNF1F2=F1FN+1=1FN+1.\begin{gather*} (1-\rho_1)(1-\rho_2)\cdots(1-\rho_N) = {F_N\over F_{N+1}}{F_{N-1}\over F_N}\cdots {F_1\over F_2}={F_1\over F_{N+1}}={1\over F_{N+1}}. \end{gather*}

The Fibonnaci method is better than the golden section method in that it gives a smaller final uncertainty range.
We point out that there is an anomaly in the final iteration of the Fibonacci search method, because

ρN=1F1F2=12.\begin{gather*} \rho_N=1-{F_1\over F_2}={1\over 2}. \end{gather*}

To get arounf this problem, we perform the new evaluation for the last iteration using ρN=1/2ε\rho_N=1/2-\varepsilon, where ε\varepsilon is a small number. Therefore,

1ρN=121(ρNε)=12+ε=1+2ε2,\begin{gather*} 1-\rho_N={1\over 2} \\ 1-(\rho_N-\varepsilon)={1\over2}+\varepsilon={1+2\varepsilon\over2}, \end{gather*}

Therefore, in the worst case, the reduction factor in the uncertainty range for the Fibonacci method is

1+2εFN+1.\begin{gather*} {1+2\varepsilon\over F_{N+1}}. \end{gather*}

Lemma 1

For k2k\ge 2,

rk=Fk2Fk1r1Fk3Fk2r1.\begin{gather*} r_k=-{F_{k-2}-F_{k-1}r_1\over F_{k-3}-F_{k-2}r_1}. \end{gather*}

Proof of Lemma 1

We proceed by induction. For k=2k=2 we have

r2=1r11=1r1r1=F0F1r1F1F0r1\begin{gather*} r_2={1\over r_1}-1={1-r_1\over r_1}=-{F_0-F_1r_1\over F_{-1}-F_0r_1} \end{gather*}

and hence the lemma holds for k=2, Suppose now that the lemma holds for k2k\ge 2. We show that it also holds for k+1k+1. We have

rk+1=1rk1=Fk3+Fk2r1Fk2Fk1r1Fk2Fk1r1Fk2Fk1r1=Fk2+Fk3(Fk1+Fk2)r1Fk2Fk1r1=Fk1Fkr1Fk2Fk1r1,\begin{align*} r_{k+1} & = {1\over r_k}-1 \\ & = {F_{k-3}+F_{k-2}r_1\over F_{k-2}-F_{k-1}r_1}-{F_{k-2}-F_{k-1}r_1\over F_{k-2}-F_{k-1}r_1} \\ & = -{F_{k-2}+F_{k-3}-(F_{k-1}+F_{k-2})r_1\over F_{k-2}-F_{k-1}r_1} \\ & = -{F_{k-1}-F_kr_1\over F_{k-2}-F_{k-1}r_1}, \end{align*}

where we used the formation law for the Fibonacci sequence.

Lemma 2

For k2k\ge 2,

(1)k(Fk2Fk1r1)>0.\begin{gather*} (-1)^k(F_{k-2}-F_{k-1}r_1)>0. \end{gather*}

Proof of Lemma 2

We proceed by induction. For k=2k=2, we have

(1)2(F0F1r1)=1r1.\begin{gather*} (-1)^2(F_0-F_1r_1)=1-r_1. \end{gather*}

But r1=1/(1+r2)2/3r_1=1/(1+r_2) \le 2/3, and hence 1r1>01-r_1>0. Therefore, the result holds for k=2k=2. Suppose now that the lemma holds for k2k\ge 2. We show that it also holds for k+1k+1. We have

(1)k+1(Fk1Fkr1)=(1)k+1rk+11rk+1(Fk1Fkr1).\begin{gather*} (-1)^{k+1}(F_{k-1}-F_kr_1)=(-1)^{k+1}r_{k+1}{1\over r_{k+1}}(F_{k-1}-F_kr_1). \end{gather*}

By Lemma 1,

rk+1=Fk1Fkr1Fk2Fk1r1.\begin{gather*} r_{k+1}=-{F_{k-1}-F_kr_1 \over F_{k-2}-F_{k-1}r_1}. \end{gather*}

Substituting for 1/rk+11/r_{k+1}, we obtain

(1)k+1(Fk1Fkr1)=rk+1(1)k(Fk2Fk1r1)>0,\begin{gather*} (-1)^{k+1}(F_{k-1}-F_kr_1)=r_{k+1}(-1)^k(F_{k-2}-F_{k-1}r_1)>0, \end{gather*}

which completes the proof.

Lemma 3

For k2k \ge 2,

(1)k+1r1(1)k+1FkFk+1.\begin{gather*} (-1)^{k+1}r_1\ge (-1)^{k+1}{F_k\over F_{k+1}}. \end{gather*}

Proof of Lemma 3

Because rk+1=1rk1r_{k+1}={1\over r_k}-1 and rk12r_k \ge {1\over2}, we have rk+11r_{k+1}\ge 1. Substituting for rk+1r_{k+1} from Lemma 1, we get

Fk1Fkr1Fk2Fk1r11.\begin{gather*} -{F_{k-1}-F_kr_1\over F_{k-2}-F_{k-1}r_1}\le 1. \end{gather*}

Multiplying the numerator and denominator by (1)k(-1)^k yields

(1)k+1(Fk1Fkr1)(1)k(Fk2Fk1r1)1.\begin{gather*} {(-1)^{k+1}(F_{k-1}-F_kr_1)\over (-1)^k(F_{k-2}-F_{k-1}r_1)}\le 1. \end{gather*}

By Lemma 2, (1)k(Fk2Fk1r1)>0(-1)^k(F_{k-2}-F_{k-1}r_1)>0, and therefore we can multiply both sides of the inequality above by $(-1)^k(F{k-2}-F{k-1}r_1) to obtain

(1)k+1(Fk1Fkr1)(1)k(Fk2Fk1r1).\begin{gather*} (-1)^{k+1}(F_{k-1}-F_kr_1) \le (-1)^k(F_{k-2}-F_{k-1}r_1). \end{gather*}

Rearranging yields

(1)k+1(Fk1+Fk)r1(1)k+1(Fk2+Fk1).\begin{gather*} (-1)^{k+1}(F_{k-1}+F_k)r_1 \ge (-1)^{k+1}(F_{k-2}+F_{k-1}). \end{gather*}

Using the law of formation of the Fibonacci sequence, we get

(1)k+1Fk+1r1(1)k+1Fk,\begin{gather*} (-1)^{k+1}F_{k+1}r_1 \ge (-1)^{k+1}F_k, \end{gather*}

which upon dividing by Fk+1F_{k+1} on both sides gives the desired result.

Theorem (Optimality of the Fibonacci Method)

Let r1,,rN,N2r_1,\cdots,r_N,N\ge 2, satisfy the constraints

rk+1=1rk1,k=1,,N1,rk12,k=1,,N.\begin{gather*} r_{k+1}={1\over r_k}-1, k=1,\cdots,N-1, \\ r_k \ge {1\over 2}, k=1,\cdots,N. \end{gather*}

Then,

r1rN1FN+1.\begin{gather*} r_1\cdots r_N \ge {1\over F_{N+1}}. \end{gather*}

Furthermore,

r1rN=1FN+1\begin{gather*} r_1\cdots r_N = {1\over F_{N+1}} \end{gather*}

if and only if rk=FNk+1/FNk+2,k=1,,Nr_k=F_{N-k+1}/F_{N-k+2}, k=1,\cdots,N. In other words, the values of r1,,rNr_1,\cdots,r_N used in the Fibonacci search method form a unique solution to the optimization problem.

Proof

By substituting expressions for r1,,rNr_1,\cdots,r_N from Lemma 1 and performing the appropriate cancellations, we obtain

r1rN=(1)N(FN2FN1r1)=(1)NFN2+FN1(1)N+1r1.\begin{gather*} r_1\cdots r_N=(-1)^N(F_{N-2}-F_{N-1}r_1)=(-1)^NF_{N-2}+F_{N-1}(-1)^{N+1}r_1. \end{gather*}

Using Lemma 3 yields

r1rN(1)NFN2+FN1(1)N+1FNFN+1=(1)N(FN2FN+1FN1FN)1FN+1.\begin{align*} r_1\cdots r_N & \ge (-1)^NF_{N-2}+F_{N-1}(-1)^{N+1}{F_N\over F_{N+1}} \\ & = (-1)^N(F_{N-2}F_{N+1}-F_{N-1}F_N){1\over F_{N+1}}. \end{align*}

The following holds: (1)N(FN2FN+1FN1FN)=1(-1)^N(F_{N-2}F_{N+1}-F_{N-1}F_N)=1 (You can trust me here, easy to prove on you own using induction). Hence,

r1rN1FN+1.\begin{gather*} r_1\cdots r_N\ge {1\over F_{N+1}}. \end{gather*}

From the above we see that

r1rN=1FN+1.\begin{gather*} r_1\cdots r_N = {1\over F_{N+1}}. \end{gather*}

if and only if

r1=FNFN+1.\begin{gather*} r_1 = {F_N\over F_{N+1}}. \end{gather*}

This is simply the value of r1r_1 for the Fibonacci search method.

Bisection Method

The bisection method is a simple algorithm for successively reducing the uncertainty interval based on evaluations of the derivative. To begin, let x(0)=(a0+b0)/2x^{(0)}=(a_0+b_0)/2 be the midpoint of the initial uncertainty interval. Next, evaluate f(x(0))f'(x^(0)). If f(x(0))>0f'(x^{(0)})>0, then we deduce that the minimizer lies to the left of x(0)x^{(0)}. On the other hand, if f(x(0))<0f'(x^{(0)})<0, then we deduce that the minimizer lies to the right of x(0)x^{(0)}. Finally, if f(x(0))=0f'(x^{(0)})=0, then we declare x(0)x^{(0)} to be the minimizer and terminate our search.
The uncertainty interval is reduced by a factor of (1/2)N(1/2)^N.

Newton's Method

We assume now that at each measurement point x(k)x^{(k)} we can determine f(x(k)),f(x(k)),f(x(k))f(x^{(k)}),f'(x^{(k)}),f''(x^{(k)}). We can fit a quadratic function through x(k)x^{(k)} that matches its first and second derivatives with that of the function f. This quadratic has the form

q(x)=f(x(k))+f(x(k))(xx(k))+12f(x(k))(xx(k))2.\begin{gather*} q(x)=f(x^{(k)})+f'(x^{(k)})(x-x^{(k)})+{1\over 2}f''(x^{(k)})(x-x^{(k)})^2. \end{gather*}

Then, instead of minimizing ff, we minimize its approximation qq. The first-order neccesary condition for a minimizer of qq yields

0=q(x)=f(x(k))+f(x(k))(xx(k)).\begin{gather*} 0=q'(x)=f'(x^{(k)})+f''(x^{(k)})(x-x^{(k)}). \end{gather*}

Setting x=x(k+1)x=x^{(k+1)}, we obtain

x(k+1)=x(k)f(x(k))f(x(k)).\begin{gather*} x^{(k+1)} = x^{(k)} - {f'(x^{(k)}) \over f''(x^{(k)})}. \end{gather*}